package com.beamfield.dao.material;

import com.beamfield.model.InboundCheck;
import com.beamfield.model.InboundCheckExample;
import com.beamfield.model.InboundCheckWithBLOBs;
import com.beamfield.modelVo.SuppliesDetectVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

@Component
public interface InboundCheckMapper {
    int deleteByPrimaryKey(Long inbound_check_id);

    int insert(InboundCheckWithBLOBs record);

    int insertSelective(InboundCheckWithBLOBs record);

    List<InboundCheckWithBLOBs> selectByExampleWithBLOBs(InboundCheckExample example);

    List<InboundCheck> selectByExample(InboundCheckExample example);

    InboundCheckWithBLOBs selectByPrimaryKey(Long inbound_check_id);

    int updateByPrimaryKeySelective(InboundCheckWithBLOBs record);

    int updateByPrimaryKeyWithBLOBs(InboundCheckWithBLOBs record);

    int updateByPrimaryKey(InboundCheck record);

    InboundCheckWithBLOBs selectByCheckNum(@Param("check_num") String checkNum, @Param("beam_id")Long beamId);

    Integer selectTodayMaxNum(@Param("beamId")Long beamId);

    List<SuppliesDetectVo> getSuppliesDetectData(@Param("suppliesName") String suppliesName,
                                                 @Param("beamId") Long beamId,
                                                 @Param("offset") String offset,
                                                 @Param("limit") String limit, @Param("start")Date start, @Param("end") Date end);

    long countSuppliesDetectData(@Param("suppliesName") String suppliesName, @Param("beamId") Long beamId,@Param("start") Date start, @Param("end") Date end);
    List<SuppliesDetectVo> getSuppliesDetectDataOther(
            @Param("beamId") Long beamId,
            @Param("offset") String offset,
            @Param("limit") String limit, @Param("start") Date start, @Param("end") Date end);
    long countSuppliesDetectDataOther(@Param("beamId") Long beamId,@Param("start") Date start, @Param("end") Date end);

    List<SuppliesDetectVo> getSuppliesDetectDataUnpass(@Param("suppliesName") String suppliesName,
                                                       @Param("beamId") Long beamId,
                                                       @Param("offset") String offset,
                                                       @Param("limit") String limit, @Param("start")String start, @Param("end") String end);
    List<SuppliesDetectVo> getSuppliesDetectDataUnpassAndPass(@Param("suppliesName") String suppliesName,
                                                              @Param("beamId") Long beamId,
                                                              @Param("offset") String offset,
                                                              @Param("limit") String limit, @Param("check_num") String check_num,  @Param("start")String start, @Param("end") String end);

    long countSuppliesDetectDataUnpass(@Param("suppliesName") String suppliesName, @Param("beamId") Long beamId,  @Param("start")String start, @Param("end") String end);
    long countSuppliesDetectDataUnpassAndPass(@Param("suppliesName") String suppliesName, @Param("beamId") Long beamId, @Param("check_num") String check_num, @Param("start")String start, @Param("end") String end);


    List<SuppliesDetectVo> getSuppliesDetectDataOtherUnpass(
            @Param("beamId") Long beamId,
            @Param("offset") String offset,
            @Param("limit") String limit,  @Param("start")String start, @Param("end") String end);

    long countSuppliesDetectDataOtherUnpass(@Param("beamId") Long beamId, @Param("start")String start, @Param("end") String end);

    List<SuppliesDetectVo> getSuppliesDetectDataOut(   @Param("beamId") Long beamId,
                                                       @Param("offset") String offset,
                                                       @Param("limit") String limit);
    Long countSuppliesDetectDataOut(@Param("beamId") Long beamId);

    int deleteByInboundId(String inboundId);
}
